import request from '@/utils/request'

// 查询用户饮食记录列表
export function listDiet(query) {
  return request({
    url: '/healthSys/diet/list',
    method: 'get',
    params: query
  })
}

// 查询用户饮食记录详细
export function getDiet(dietId) {
  return request({
    url: '/healthSys/diet/' + dietId,
    method: 'get'
  })
}

// 新增用户饮食记录
export function addDiet(data) {
  return request({
    url: '/healthSys/diet',
    method: 'post',
    data: data
  })
}

// 修改用户饮食记录
export function updateDiet(data) {
  return request({
    url: '/healthSys/diet',
    method: 'put',
    data: data
  })
}

// 删除用户饮食记录
export function delDiet(dietId) {
  return request({
    url: '/healthSys/diet/' + dietId,
    method: 'delete'
  })
}
